package com.bcinfo.iccard.constant;

import java.util.LinkedHashMap;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

/**
 * 充值卡常量 <br/>
 * <p>
 * Description:<br/>
 * <p>
 * TODO 详细描述
 * 
 * <p>
 * For Examples <br/>
 * 
 * <PRE>
 * </PRE>
 * <p>
 */
public class RechargeableConstant
{

    /**
     * @Fields SysConfigValue_Key : 系统参数表 --名为“pwd”的键
     */
    public static final String             SysConfigValue_Key                      = "pwd";

    /**
     * @Fields RECHARGEABLE_VALUE_ALL : -1 表示所有状态，在mybatis中判断-1时，不加入对应的条件查询
     */
    public static final Short              RECHARGEABLE_VALUE_ALL                  = -1;

    /**
     * 0:入库
     */
    public static final Short              RECHARGEABLE_CARD_STATUS_STORAGE        = 0;

    /**
     * 1:出库
     */
    public static final Short              RECHARGEABLE_CARD_STATUS_DISCHARGE      = 1;

    /**
     * 2:激活
     */
    public static final Short              RECHARGEABLE_CARD_STATUS_ACTIVATE       = 2;

    /**
     * 3:冻结
     */
    public static final Short              RECHARGEABLE_CARD_STATUS_FREEZE         = 3;

    /**
     * 4:销户
     */
    public static final Short              RECHARGEABLE_CARD_STATUS_CANCEL         = 4;

    public static final Map<Short, String> RECHARGEABLE_CARD_STATUS_MAP            = new ConcurrentHashMap<Short, String>(
                                                                                           new LinkedHashMap<Short, String>(
                                                                                                   13));

    /**
     * @Fields RECHARGEABLE_CARD_TYPE_NEW : 新卡
     */
    public static final Short              RECHARGEABLE_CARD_TYPE_NEW              = 0;

    /**
     * @Fields RECHARGEABLE_CARD_TYPE_OLD : 复用卡
     */
    public static final Short              RECHARGEABLE_CARD_TYPE_OLD              = 1;

    public static final String             RECHARGEABLE_CARD_DEFAULTPWD            = "999999";

    public static final Map<Short, String> RECHARGEABLE_CARD_TYPE_MAP              = new LinkedHashMap<Short, String>(
                                                                                           10);

    /**
     * @Fields RECHARGEABLE_DETAIL_ACCOUNT_CHECKED_YES : 1 是否已对账 是
     */
    public static final Short              RECHARGEABLE_DETAIL_ACCOUNT_CHECKED_YES = 1;

    /**
     * @Fields RECHARGEABLE_DETAIL_ACCOUNT_CHECKED_NO : 0 是否已对账 否
     */
    public static final Short              RECHARGEABLE_DETAIL_ACCOUNT_CHECKED_NO  = 0;

    /**
     * @Fields RECHARGEABLE_DETAIL_ACCOUNT_OPSTATUS_RECHARGE : 1 充值
     */
    public static final Short              RECHARGEABLE_DETAIL_OPSTATUS_RECHARGE   = 1;

    /**
     * @Fields RECHARGEABLE_DETAIL_ACCOUNT_OPSTATUS_REFUND : 0 退款
     */
    public static final Short              RECHARGEABLE_DETAIL_OPSTATUS_REFUND     = 0;

    /**
     * @Fields RECHARGEABLE_DETAIL_RECHARGETYPE_CASH : 1 现金
     */
    public static final Short              RECHARGEABLE_DETAIL_RECHARGETYPE_CASH   = 1;

    /**
     * @Fields RECHARGEABLE_DETAIL_RECHARGETYPE_BANK : 0 网银
     */
    public static final Short              RECHARGEABLE_DETAIL_RECHARGETYPE_BANK   = 0;

    public static final Map<Short, String> RECHARGEABLE_DETAIL_RECHARGETYPE_MAP    = new LinkedHashMap<Short, String>(
                                                                                           10);

    public static final Map<Short, String> RECHARGEABLE_DETAIL_ACCOUNT_CHECK_MAP   = new LinkedHashMap<Short, String>(
                                                                                           10);

    /**
     * 增加
     */
    public static final String             ADD                                     = "ADD";
    /**
     * 减少
     */
    public static final String             DELETE                                  = "DELETE";

    public static final long               DEFAUL_CARD_VALID_TTIME                 = 365 * 24 * 60 * 60 * 1000;

    /**
     * 卡余额清空
     */
    public static final Float              RECHARGEABLE_TOTAL_ACCOUNT_ZERO         = (float) 0;

    static
    {
        RECHARGEABLE_CARD_STATUS_MAP.put(RECHARGEABLE_CARD_STATUS_STORAGE, "入库");
        RECHARGEABLE_CARD_STATUS_MAP.put(RECHARGEABLE_CARD_STATUS_DISCHARGE, "出库");
        RECHARGEABLE_CARD_STATUS_MAP.put(RECHARGEABLE_CARD_STATUS_ACTIVATE, "激活");
        RECHARGEABLE_CARD_STATUS_MAP.put(RECHARGEABLE_CARD_STATUS_FREEZE, "冻结");
        RECHARGEABLE_CARD_STATUS_MAP.put(RECHARGEABLE_CARD_STATUS_CANCEL, "销户");
    }

    static
    {
        RECHARGEABLE_CARD_TYPE_MAP.put(RECHARGEABLE_CARD_TYPE_NEW, "新卡");
        RECHARGEABLE_CARD_TYPE_MAP.put(RECHARGEABLE_CARD_TYPE_OLD, "复用卡");
    }

    static
    {
        RECHARGEABLE_DETAIL_ACCOUNT_CHECK_MAP.put(RECHARGEABLE_DETAIL_ACCOUNT_CHECKED_YES, "是");
        RECHARGEABLE_DETAIL_ACCOUNT_CHECK_MAP.put(RECHARGEABLE_DETAIL_ACCOUNT_CHECKED_NO, "否");
    }

    static
    {
        RECHARGEABLE_DETAIL_RECHARGETYPE_MAP.put(RECHARGEABLE_DETAIL_RECHARGETYPE_CASH, "现金");
        RECHARGEABLE_DETAIL_RECHARGETYPE_MAP.put(RECHARGEABLE_DETAIL_RECHARGETYPE_BANK, "网银");
    }
}
